<?php
class qConfig 
{
	public static function Init()
	{
	    include 'configuration.class.php';
	}
	
	public static function LoadIni($filename, $section = null)
	{
	    if (!file_exists($filename))
	    {
	        // LOG: Trying to load unexistant .ini file
	        return false;
	    }
	    
	    $file = file($filename);
		
		for ($i = 0; $i < count($file); $i++)
		{
		    if ($file[$i][0] == ';')
		    	continue;
		    	
		    else if ($file[$i][0] == '[')
		    {
		    	$currentsection = mb_substr($file[$i], 1, mb_strpos($file[$i], ']'));
		    	
		    	if (!($section == null || $currentsection == $section)) 
		    		continue;
		    	
		    	$i++;
		        while ($file[$i][0] != '[') 
		        {
		            
		        }
		    }
		    
		    else
		    	continue;
		}	    
	}
}